package com.jurenzhao.partssystem.work.dayli.service;

import com.jurenzhao.partssystem.work.dayli.dao.WorkMessageMapper;
import com.jurenzhao.partssystem.work.dayli.entity.WorkMessage;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service
public class WorkMessageService {

    @Resource
    private WorkMessageMapper workMessageMapper;

    public List<WorkMessage>findAll(){
        return workMessageMapper.findAll();
    }

    public WorkMessage findById(int messId){
        return workMessageMapper.findById(messId);
    }

    public void save(WorkMessage workMessage){
        workMessageMapper.insertSelective(workMessage);
    }

    public boolean update(WorkMessage workMessage){
        return workMessageMapper.updateByPrimaryKey(workMessage)>0;
    }

    public boolean updateselect(WorkMessage workMessage){
        return workMessageMapper.updateByPrimaryKeySelective(workMessage)>0;
    }

    public boolean delete(int messId){
        return workMessageMapper.deleteByPrimaryKey(messId)>0;
    }


}
